
import time
sp = []
f = open('m1.sorted.txt')
for i in f:
    sp.append(int(i))
def bubble(sp):
    for i in range(len(sp) - 1):
        k = 0
        for j in range(len(sp) - 1 - i):
            if sp[j] > sp[j+1]:
                t = sp[j]
                sp[j] = sp[j+1]
                sp[j+1] = t
                k += 1
            if k == 0:
                break
    return sp
start = time.perf_counter()
sp = bubble(sp)
finish = time.perf_counter()
print('m1.sorted', finish-start, 'milliseconds')
f1 = open('m1.sorted.txt')
sp2 = []
round((finish-start)*1000)
